package com.kelvin.paopao.adapter;

import android.content.Context;
import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.hyphenate.chat.EMConversation;
import com.hyphenate.easeui.utils.EaseCommonUtils;
import com.hyphenate.easeui.utils.EaseSmileUtils;
import com.kelvin.kelvinlib.db.dao.DaoSession;
import com.kelvin.kelvinlib.db.dao.UserInfoDao;
import com.kelvin.kelvinlib.imageloader.GlideUtil;
import com.kelvin.kelvinlib.utils.CommonUtil;
import com.kelvin.paopao.R;
import com.kelvin.paopao.api.responseBean.KefuModel;

import java.util.Date;
import java.util.List;


/**
 * Created by MCK on 2017/5/9.
 */
public class KefuAdapter extends BaseQuickAdapter<KefuModel, BaseViewHolder> {

    private Context context;

    public KefuAdapter(Context context) {
        super(R.layout.recycler_kefu_item);
        this.context = context;
    }

    @Override
    protected void convert(BaseViewHolder helper, KefuModel item) {
        helper.setText(R.id.tv_name, item.getUser_name());
        ImageView iv = helper.getView(R.id.iv_touxiang);
        GlideUtil.loadImgCircle(item.getUser_headimg(), iv, context, R.drawable.default_img);
    }
}
